<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script src="resource/javascript/TreeNode.js" type="text/javascript"></script>
<script src="resource/javascript/Tree.js" type="text/javascript"></script>
<link href="resource/css/left.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" height="100%" cellspacing=0 border=0 cellpadding=0 style="border-bottom:1px solid #0A71B3;">
	<tr>
	<td id="tl" width=10 height=29></td>
	<td id="tc">主菜单</td>
	<td id="tr" width=10></td>
	</tr>
	<tr>
	<td id="ls"></td>
	<td valign="top" id="meunTree" style="background-color:white;height:100%;"></td>
	<td id="rs"></td>
	</tr>
	
</table>
<!-- 学生权限 -->
{if $user_info.type_id == 1}
<script language="javascript">
	var root = new TreeNode("系统菜单");
	var n1 = new TreeNode("修改信息","student_show?id={$user_info.username}");
	root.add(n1);
	var n2 = new TreeNode("成绩查看","score_list");
	root.add(n2);
	var n3 = new TreeNode("课表查看","schedule_listByClassIdAndPeriodAndTerm");
	root.add(n3);
	var n4 = new TreeNode("选择课程","course_selectInput");
	root.add(n4);
	var tree = new Tree(root);
	tree.showIn("meunTree");
</script>
{/if}

<!-- 老师权限 -->
{if $user_info.type_id == 2 || $user_info.type_id == 3}
	<script language="javascript">
	var root = new TreeNode("系统菜单");
	var n1 = new TreeNode("基本信息");
	root.add(n1);
	var mydetails  = new TreeNode("我的信息","teacher_show?id={$user_info.username}");
	n1.add(mydetails);
	
	var n2 = new TreeNode("授课信息");
	root.add(n2);
	var cl = new TreeNode("我的授课","schedule/schedule_list?teacherId={$user_info.username}");
	n2.add(cl);
	
	var n3 = new TreeNode("成绩管理");
	root.add(n3);
	var require = new TreeNode("必修");
	n3.add(require);
	var addS = new TreeNode("登记成绩","score_input");
	require.add(addS);
	var checkscore = new TreeNode("查看成绩","score_check");
	require.add(checkscore);
	var choose = new TreeNode("选修");
	n3.add(choose);
	var addS2 = new TreeNode("登记成绩","score_listTheNoRequire");
	choose.add(addS2);
	var checkscore2 = new TreeNode("查看成绩","score_checkNoReq");
	choose.add(checkscore2);
	
	//班主任权限
	{if $user_info.type_id == 3} 
		var n4 = new TreeNode("班级管理");
		root.add(n4);
		var sl = new TreeNode("花名册","student_list");
		n4.add(sl);
		var cl = new TreeNode("班干部","student_listClassLeader");
		n4.add(cl);
	{/if}
	
	var tree = new Tree(root);
	tree.showIn("meunTree");
</script>
{/if}

<!-- 管理员权限 -->
{if $user_info.type_id == 4}
<script language="javascript">
	var root = new TreeNode("系统菜单");
	
	//学生管理
	var n1 = new TreeNode("学生管理");
	root.add(n1);
	var addStu = new TreeNode("添加学生","action.php?page=student_input");
	n1.add(addStu);
	var stuList = new TreeNode("学生列表","action.php?page=student_listAll");
	n1.add(stuList);
	
	//教师管理
	var n2 = new TreeNode("教师管理");
	root.add(n2);
	var addTea = new TreeNode("添加教师","teacher_input");
	n2.add(addTea);
	var teaList = new TreeNode("教师列表","teacher_listAll");
	n2.add(teaList);
	
	//课程管理
	var n3 = new TreeNode("课程管理");
	root.add(n3);
	var addCourse = new TreeNode("添加课程","course_input");
	n3.add(addCourse);
	var courseList = new TreeNode("课程列表","course_list");
	n3.add(courseList);
	var courseChoose = new TreeNode("选课管理","course_control");
	n3.add(courseChoose);
	
	//课表安排
	var n4 = new TreeNode("课表安排");
	root.add(n4);
	var addSch = new TreeNode("课表安排","schedule_input");
	n4.add(addSch);
	
	var tree = new Tree(root);
	tree.showIn("meunTree");
</script>
{/if}
</body>
</html>
